package com.jboltai.pptextract;

import java.io.File;
import java.io.IOException;
import java.util.Map;

/**
 * Interface for processing PPT files page by page with callbacks
 */
public interface PPTPageProcessor {
    
    /**
     * Callback interface for handling each slide's content
     */
    interface SlideContentHandler {
        /**
         * Called when a slide is processed
         * 
         * @param slideNumber The slide number (1-based)
         * @param title The slide title (may be null)
         * @param textContent The text content of the slide
         * @param mediaFiles Map of media files found in the slide (filename -> File object)
         */
        void onSlideProcessed(int slideNumber, String title, String textContent, Map<String, File> mediaFiles);
    }
    
    /**
     * Process a PPT file slide by slide, calling the handler for each slide
     * 
     * @param pptFile PPT file to process
     * @param outputDir Directory to save extracted media files
     * @param handler Callback handler for each slide's content
     * @throws IOException If an I/O error occurs
     */
    void processSlideBySlide(File pptFile, File outputDir, SlideContentHandler handler) throws IOException;
    
    /**
     * Get the total number of slides in the PPT file
     * 
     * @param pptFile PPT file to analyze
     * @return Total number of slides
     * @throws IOException If an I/O error occurs
     */
    int getSlideCount(File pptFile) throws IOException;
} 
